1. Field of the Invention
The invention relates to a method and apparatus for performing matrix multiplication operations, more particularly to a method and apparatus for performing plural matrix multiplication operations.
2. Description of the Related Art
Matrix multiplication is frequently needed in a digital signal-processing device. For example, the functions of color space conversion and discrete cosine transform (DCT) in digital video processing involve matrix multiplication of one domain with a corresponding common scaler to obtain converted or transformed results of another domain. Conventionally, matrix multiplication is commonly implemented using multipliers or look-up tables. The look-up table approach is often preferred because it involves less complexity.
While the prior art has taught that matrix multiplication can be implemented using look-up table techniques, there is still room for improvement. Particularly, it is preferable to devise a way of implementing the look-up table technique to conduct plural matrix multiplication operations efficiently.
Therefore, the object of the present invention is to provide an efficient method and apparatus for performing plural matrix multiplication operations using reduced look-up tables.
According to the present invention, a method and apparatus are provided for performing plural matrix multiplication operations. A first one of the matrix multiplication operations is performed to obtain a product of a first coefficient (a) and a first variable (X). A second one of the matrix multiplication operations is performed to obtain a product of a second coefficient (b) and the first variable (X). In the method and apparatus of this invention, a look-up table having a plurality of entries is constructed such that each of the entries corresponds to a value of the first variable (X) and has first and second data fields that store coded products associated with the coefficients (a), (b). When the first variable (X) is provided to the look-up table to address a corresponding one of the entries, the coded product in the first data field of the corresponding one of the entries is generated at a first output of the look-up table, while the coded product in the second data field of the corresponding one of the entries is generated at a second output of the look-up table. A decoder processes the coded products from the first and second outputs of the look-up table, such as by performing arithmetic combining operations, to obtain the results of the matrix multiplication operations.
In a preferred embodiment, a DPCM coding scheme is applied to reduce the size of the look-up table such that the first data field stores the product of the corresponding value of the first variable (X) and the first coefficient (a), while the second data field stores the product of the corresponding value of the first variable (X) and a differential coefficient (bxe2x88x922ma), where m is an integer. The result of the first one of the matrix multiplication operations is obtained from the first output of the look-up table when the first variable (X) is used to address the look-up table. The decoder combines the products at the first and second outputs of the look-up table to obtain the result of the second one of the matrix multiplication operations when the first variable (X) is used to address the look-up table.
In another preferred embodiment, a binary polynomial approximation coding scheme is applied to reduce the size of the look-up table such that the first data field stores the product of the corresponding value of the first variable (X) and a third coefficient (r), while the second data field stores the product of the corresponding value of the first variable (X) and a fourth coefficient (c), where a=r*2m+c and b=r*2n, and m and n are integers.